package com.ihr360.expr.core;

/**
 * @author davidwei
 */
public class GraphCycleException extends Exception {

    private GraphCycleExceptionType exceptionType;
    private Object[] args;

    private GraphCycleException() {
    }

    public GraphCycleException(GraphCycleExceptionType exceptionType, Object... args) {
        super(GraphCycleExceptionType.getMessage(exceptionType, args));
        this.exceptionType = exceptionType;
        this.args = args;
    }

    public GraphCycleException(Throwable cause) {
        super(cause);
    }

    public GraphCycleException(String message, Throwable cause) {
        super(message, cause);
    }

    public GraphCycleExceptionType getExceptionType() {
        return exceptionType;
    }

    public void setExceptionType(GraphCycleExceptionType exceptionType) {
        this.exceptionType = exceptionType;
    }

    public Object[] getArgs() {
        return args;
    }

    public void setArgs(Object[] args) {
        this.args = args;
    }
}